package com.itheima.Test;

public class BBB implements Runnable{
    @Override
    public void run() {
        while (true){
            //同步代码块;
            synchronized ("左手"){
                System.out.println("柳岩左手拿起筷子");
                //同步代码块;
                synchronized ("右手"){
                    System.out.println("柳岩右手拿起筷子");

                    System.out.println("柳岩拿起筷子使劲吃");
                }
            }
        }
    }
}
